<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改长途信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-trip-edit" th:object="${amTrip}">
            <input name="tripId" th:field="*{tripId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">起始时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="beginTime" th:value="${#dates.format(amTrip.beginTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">结束时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="endTime" th:value="${#dates.format(amTrip.endTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">接收医院：</label>
                <div class="col-sm-8">
                    <input name="fromHospital" th:field="*{fromHospital}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">送达医院：</label>
                <div class="col-sm-8">
                    <input name="toHospital" th:field="*{toHospital}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">伙食补助：</label>
                <div class="col-sm-8">
                    <input name="foodMoney" th:field="*{foodMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">主驾驶：</label>
                <div class="col-sm-8">
                    <input name="mainName" th:field="*{mainName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">副驾驶：</label>
                <div class="col-sm-8">
                    <input name="cpName" th:field="*{cpName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">医生：</label>
                <div class="col-sm-8">
                    <input name="doctor" th:field="*{doctor}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">护士：</label>
                <div class="col-sm-8">
                    <input name="norse" th:field="*{norse}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">加油量：</label>
                <div class="col-sm-8">
                    <input name="oil" th:field="*{oil}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收车里程：</label>
                <div class="col-sm-8">
                    <input name="etc" th:field="*{etc}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">人到未走：</label>
                <div class="col-sm-8">
                    <input name="buzhu" th:field="*{buzhu}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">车牌号：</label>
                <div class="col-sm-8">
                    <input name="carId" th:field="*{carId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">班次：</label>
                <div class="col-sm-8">
                    <input name="orders" th:field="*{orders}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "am/trip";
        $("#form-trip-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-trip-edit').serialize());
            }
        }

        $("input[name='beginTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='endTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>